using Mvc.Mailer;
using OurWedding1.Models;
using System;
using System.Collections.Generic;

namespace OurWedding1.Mailers
{ 
    public class MailingMailer : MailerBase, IMailingMailer 	
	{
		public MailingMailer()
		{
			MasterName="_Layout";
		}
		
		public virtual MvcMailMessage Today(Wedding wedding,UserProfile user,IList<string> tasks)
		{
			ViewBag.Wedding = wedding;
            ViewBag.User = user.UserName;
            int days = wedding.Date.Value.Subtract(DateTime.Now).Days;
            ViewBag.Tasks = tasks;
            ViewBag.Days = days;
			return Populate(x =>
			{
                x.Subject = wedding.Name +" "+ String.Format(Resources.Mailing_DaysRemaining, days);
				x.ViewName = "Today";
				x.To.Add(user.Email);
			});
		}
 	}
}